{extend name="public/base"/}
{block name="body"}
<div class="main-box clearfix">
	<header class="main-box-header clearfix">
		<div class="pull-left">
			<h2>{$meta_title}</h2>
		</div>
		<div class="pull-right">
			<a href="{:url('Group/index')}" class="btn btn-danger">
				<i class="glyphicon glyphicon-menu-left"></i> 
				返回
			</a>
		</div>
	</header>
	<div class="main-box-body clearfix">
		<div class="table-responsive clearfix">
			<form action="" class="form" method="post">
				<table class="table table-striped">
					<thead>
						<tr>
							<th class="col-lg-2 text-right">分组</th>
							<th>权限</th>
						</tr>
					</thead>
					<tbody>
						{volist name="list" id="node"}
						<tr>
							<td class="info col-lg-2 text-right">{$key}</td>
							<td class="col-lg-10 text-left">
								{volist name="node" id="item"}
								<div class="checkbox-nice checkbox-inline">
								<input type="checkbox" name="rule[]" value="{$item['id']}" id="{$item['name']}" {if in_array($item['id'],$auth_list)}checked{/if} />
								<label for="{$item['name']}">{$item['title']}</label>
								</div>
								{/volist}
							</td>
						</tr>
						{/volist}
						<tr>
							<td class="info col-lg-2 text-right">模块</td>
							<td class="col-lg-10 text-left">
								{volist name="model" id="item"}
								<div class="checkbox-nice checkbox-inline">
								<input type="checkbox" name="extend_rule[2][]" value="{$item['id']}" id="{$item['name']}" {if in_array($item['id'],$extend_auth)}checked{/if} />
								<label for="{$item['name']}">{$item['title']}</label>
								</div>
								{/volist}
							</td>
						</tr>
					</tbody>
				</table>
				<div class="form-group">
					<div class="col-lg-offset-2 col-lg-10">
						<input type="hidden" name="id" value="{$id}">
						<button type="submit" class="btn btn-success submit-btn ajax-post" target-form="form">确认提交</button>
						<button class="btn btn-danger btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
					</div>
				</div>
			</form>
		</div>
	</div>
</div>
{/block}